package com.MediaVaultTest;

import java.io.IOException;

import javax.jdo.PersistenceManager;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import javax.jdo.Extent;

import com.google.appengine.api.blobstore.BlobstoreService;
import com.google.appengine.api.blobstore.BlobstoreServiceFactory;

public class genUploadURL extends HttpServlet {
	
	public void doGet(HttpServletRequest req, HttpServletResponse res)
    throws IOException {
		BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService();
	    res.setHeader("Content-Type", "text/plain");
		res.getOutputStream().print(blobstoreService.createUploadUrl("/upload"));
	}
}
